import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-todo-footer',
  templateUrl: './todo-footer.component.html',
  styleUrls: ['./todo-footer.component.css']
})
export class TodoFooterComponent implements OnInit {

  @Input() itemCount: number;
  @Output() onClear = new EventEmitter<boolean>();
  constructor() { }

  ngOnInit() {
  }
  onClick() {
    console.log('clear onClick');
    // this.onClear.emit(true);
    localStorage.removeItem('userId');
    window.opener = null;
    window.open("", "_self");
    window.close();
  }
}
